﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAO;
using DTO;

namespace BUS
{
    public class HoaDonBUS
    {
        HoaDonDAO hdDAO = new HoaDonDAO();

        public List<HoaDonDTO> LayDanhSachHoaDon()
        {
            return hdDAO.LayDanhSachHoaDon();
        }

        public int ThemHoaDon(HoaDonDTO hd)
        {
            return hdDAO.ThemHoaDon(hd);
        }

        public string CapNhatHoaDon(HoaDonDTO hd)
        {
            return hdDAO.CapNhatHoaDon(hd);
        }

        public string XoaHoaDon(int ma)
        {
            return hdDAO.XoaHoaDon(ma);
        }

        public HoaDonDTO LayThongTinHoaDon(int ma)
        {
            return hdDAO.LayThongTinHoaDon(ma);
        }

        public List<HoaDonDTO> LayDanhSachHoaDonTheoNgay(string tungay, string denngay)
        {
            return hdDAO.LayDanhSachHoaDonTheoNgay(tungay, denngay);
        }

        //public float TongTienTatCaHoaDon()
        //{
        //    return hdDAO.TongTienTatCaHoaDon();
        //}
    }
}
